home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
utils
/
abe.arc
/
TINY_SRC.ABE
< prev
Wrap
Text File
|
1989-06-22
|
10KB
|
169 lines
;ABE ASCII-Binary-Encoding (by Brad Templeton)
;Use 'sort' and/or 'dabe' to decode
T./.$$filecount=2
T.0N##S1000,1000,1000,ABE1
T.1N$$blocking=false
T.2R$$uname=tdabe1.c
T.3a$$os=gemdos
T.4J$$fname=tiny_src\tdabe1.c
T.5y$$date=614524966
T.6d$$perm=0
T.75$$size=4021
T.8S""%FB?>M=<;:M9:/7A6\54D318/MA.-,M+*)(M'%0&M
T.9p""&.jJG%2%&'@()*+%,-`@%0123%4567%89^;%<=>?%
T.AB""'@ABC@DEFG&HIJK)LMNO%PQRS.TUVW%XYZ[%z]^_(
T.BL""(`abc@defg%hijk(lmno%pqrs.tuvw%xyzQ(qKDE)
T.CA"")CHILMMNOPMRSTUMVWXYMZ[\]M_abcMdefgMhiklM
T.Da""*mnopMrstuMvwxyM%&'(u)*+,u-./0u1234u5678u
T.Eb""+9:;<u=>?@uABCDuEFGHuIJKLuMNOPuQRSTuUVWXu
T.Fc"",YZ[\u]^_`uabcduefghuijklumnopuqrstuuvwxu
T.GG\/@*.Tiny.ABE.'Ascii-Binary.Encoding'.Decoder.for.ABE1.(3.sets,.9
T.HB4.printables)\/...'sort'.ALL.THE.INPUT.FILES.TO{GETHER.IF.THEY'RE
T.IO.NOT.IN.ORDER`\/...Try.to.get.the.full.version.of.this.program.fr
T.JYom.various.archives`\/...This.program.is.mainly.meant.as.a.tempor
T.KDary.version.for.Unix.users`\/...DEFINE.THE.SYMBOL.JmsdosJ.on.DOS.
T.LmMACHINES`\/...By.Brad.Templeton`..This.code.is.released.to.the.pu
T.Mtblic.domain`..No\/...warranties.are.provided.or.implied`.*@\/\/\/
T.NSGinclude.<stdio`h>\/Gifdef.msdos\/Ginclude.<fcntl`h>::@*.to.get.t
T.OXhe.MSDOS.O_BINARY.symbol.only.*@\/Gendif.msdos\/Gdefine.OUR_VERSI
T.PoON.1000\/Gdefine.MAX_LLEN.80::@*.max.output.line.len.*@\/Gdefine.
T.QVNSETS.3:::@*.number.of.character.sets.*@\/Gdefine.NPRINTS.86::@*.
T.RGnumber.of.printable.characters.*@\/Gdefine.FPRINT.'%'::@*.first.p
T.SWrintable.character.used.*@\/Gdefine.LPRINT.'{z'::@*.last.printabl
T.TQe.*@\/Gdefine.SETXX.'j'\/Gdefine.NEWSET1.'Q'\/Gdefine.SET10X.'K'\
T.U1/Gdefine.SFBYTE.31\/Gdefine.NUM_SAFE.64\/Gdefine.CSUM_MOD.65536\/
T.Vf\/@*.header.characters.*@\/Gdefine.CODE_HEAD.'J'\/Gdefine.MAIN_HE
T.WmAD.'G'\/\/long.line_num;\/long.expected_sum.=.0;\/extern.long.ato
T.XRl();\/int.whatbyte[NSETS][NPRINTS];:@*.array.maps.printables.to.b
T.Yiytes.*@\/char.linbuf[MAX_LLEN];::@*.input.line.*@\/\/main()\/Q\/:
T.Z6int.i,.c,.len;\/:int.sum;\/:int.setby,.by;\/:char.ltype;\/\/:line
T.aj_num.=.1;\/Gifdef.msdos\/:setmode(.1,.O_BINARY.);::@*.make.stdout
T.bT.binary.on.DOS.*@\/Gendif\/\/:while(.fgets(.linbuf,.MAX_LLEN,.std
T.cZin.).)Q\/::if(.linbuf[0].>=.'T'.&&.linbuf[0].<=.'Z'.).Q\/:::ltype
T.dT.=.linbuf[4].==.linbuf[5].?.linbuf[4].^.0;\/:::len.=.strlen(linbu
T.eDf);\/:::if(.linbuf[len-1].==.'zn'.)\/::::linbuf[--len].=.0;\/:::.
T.fcelse\/::::continue;:@*.line.too.long.*@\/:::sum.=.0;\/:::for(.i.=
T.gW.4;.i.<.len;.i++.)\/::::sum.+=.linbuf[i];\/:::@*.bad.checksum,.no
T.hgt.a.line.for.us.*@\/:::if(.(sum.%.NUM_SAFE).j=.lnconv(linbuf[3]).
T.iF)\/::::continue;\/:::if(.(.(long)(lnconv(linbuf[0])-SFBYTE)*NUM_S
T.jiAFE+\/:::::lnconv(linbuf[1]))*NUM_SAFE.+\/:::::lnconv(linbuf[2]).
T.kyj=.line_num++.)\/::::bomb_out(JSe{quenceJ);\/:::if(.ltype.==.MAIN
T.lk_HEAD.).Q\/::::if(.linbuf[6].==.'S'.).Q\/:::::int.ver;\/:::::ver.
T.mo=.atoi(linbuf+7);\/:::::if(.ver.>.OUR_VERSION.qq.ver.<.1000.)\/::
T.nf::::bomb_out(.JVersion.numberJ.);\/:::::if(strcmp(linbuf+len-5,J,
T.oUABE1J).j=.0.)\/::::::bomb_out(JBad.Encoding.StyleJ);\/:::::K\/:::
T.pY:.else\/:::::if(.expected_sum.j=.atol(linbuf+7).)\/::::::bomb_out
T.q2(.JChecksumJ.);\/::::K\/:::else.if(.ltype.==.CODE_HEAD.).Q.@*.enc
T.rJoding.map.*@\/::::reduce(.linbuf+6.);\/::::for(.i.=.0;.i.<.8;.i++
T.s4.).Q\/:::::setby.=.linbuf[7+4+i*5];\/:::::for(.by.=.3;.by.>=.0;.b
T.tMy--.).Q\/::::::whatbyte[setby%3][linbuf[7+i*5:\/:::::::+by]].=.li
T.uEnbuf[6]*32+i*4\/:::::::+by;\/::::::setby.@=.NSETS;\/::::::K\/::::
T.v1:K\/::::K\/:::else.if(.jltype.qq.(ltype>=FPRINT.&&.ltype<=LPRINT)
T.w0).Q\/::::@*.decode.a.line.*@\/::::reduce(.linbuf+4.);\/::::expect
T.xxed_sum.=.(expected_sum.+.sum).%.CSUM_MOD;\/::::for(.i.=.4;.i.<.le
T.y4n;.i++.)\/::::..switch(c.=.linbuf[i].+.FPRINT)Q\/::::....case.NEW
T.znSET1^\/::::....case.NEWSET1+1^\/:::::putchar(whatbyte[1+c-NEWSET1
T/.U]\/:::::::[linbuf[++i]]);\/:::::break;\/::::....case.SETXX^\/::::
T//w....case.SETXX+1^\/::::....case.SETXX+2^\/::::....case.SETXX+3^\/
T/0N:::::putchar(whatbyte[1+(c-SETXX)@2]\/:::::::[linbuf[++i]]);\/:::
T/1a::putchar(whatbyte[1+(c-SETXX)%2]\/:::::::[linbuf[++i]]);\/:::::b
T/2Creak;\/::::....case.SET10X^\/::::....case.SET10X+1^\/:::::putchar
T/3u(whatbyte[1][linbuf[++i]]);\/:::::putchar(whatbyte[0][linbuf[++i]
T/4r]);\/:::::putchar(whatbyte[1+c-SET10X]\/:::::::[linbuf[++i]]);\/:
T/5q::::break;\/::::....default^\/:::::putchar(whatbyte[0][c-FPRINT])
T/6n;\/:::::break;\/:::::K\/::::K\/:::K\/::K\/\/K\/@*.reduce.elements
T/7I.of.string.to.numbers.from.0.to.NPRINTS-1.*@\/reduce(str)\/char.*
T/8estr;\/Q\/:while(.*str.)\/::*str++.-=.FPRINT;\/K\/bomb_out(err)\/c
T/99har.*err;\/Q\/:fprintf(.stderr,.JDecode.aborted.-.%s.error,.Line^
T/Am.%3`3sznJ,err,linbuf);\/:fprintf(stderr,.JTry.to.sort.file.or.get
T/By.the.advanced.DABE.decoder`znJ);\/:exit(1);\/K\/lnconv(.n.)::@*.c
T/Cuonvert.line.number.and.checksum.chars.to.ints.*@\/int.n;\/Q\/:ret
T/Dpurn.n.-.(n.>.'9'.?.(n.>.'Z'.?.'a'-38.^.'A'-12).^.'`');\/K\/
T/Ex$$end_file=tdabe1.c
T/FE$$filecrc32=4079990116
T/G5##E63300
;End of ABE encoding
T/HN##S1000,1000,1000,ABE1
T/IN$$blocking=false
T/JS$$uname=tdabe2.c
T/Ka$$os=gemdos
T/LK$$fname=tiny_src\tdabe2.c
T/M.$$date=614524968
T/Nd$$perm=0
T/OD$$size=4083
T/PB""%EA>=M<;:9M8:/7A6\54D32?0M/.-,M+1*)M(&%'M
T/Qp""&.`JK%z%&'%()*+%,-P@%0123%4567%89G;%<=>?%
T/RN""'@ABC@DEFG&HIJK)LMNO%PQRSITUVW&XYZ[%j]^_(
T/S3""(`abc@defg%hijk(lmno%pqrs%tuvw%xyzW(^QCD)
T/TL"")BFHIMLMNOMRSTUMVXYZM[\]_MabcdMefghMiklmM
T/Ue""*nopqMrstuMvwxyM%&'(u)*+,u-./0u1234u5678u
T/Vb""+9:;<u=>?@uABCDuEFGHuIJKLuMNOPuQRSTuUVWXu
T/Wc"",YZ[\u]^_`uabcduefghuijklumnopuqrstuuvwxu
T/Xf\/@*.Tiny.ABE.'Ascii-Binary.Encoding'.Decoder.for.ABE2.(4.sets@64
T/Y2,.85.printables)\/...'sort'.ALL.THE.IN{PUT.FILES.TO{GETHER.IF.THE
T/ZiY'RE.NOT.IN.ORDERP\/...Try.to.get.the.full.version.of.this.progra
T/a7m.from.various.archivesP\/...This.program.is.mainly.meant.as.a.te
T/bdmporary.version.for.Unix.usersP\/...DEFINE.THE.SYMBOL.JmsdosJ.on.
T/ciDOS.MACHINESP\/...By.Brad.TempletonP..This.code.is.released.to.th
T/dve.public.domainP..No\/...warranties.are.provided.or.impliedP.*@\/
T/eZ\/\/Kinclude.<stdioPh>\/Kifdef.msdos\/Kinclude.<fcntlPh>::@*.to.g
T/fnet.the.MSDOS.O_BINARY.symbol.only.*@\/Kendif.msdos\/Kdefine.OUR_V
T/g3ERSION.1000\/Kdefine.MAX_LLEN.80::@*.max.output.line.len.*@\/Kdef
T/hYine.NSETS.4:::@*.number.of.character.sets.*@\/Kdefine.SFBYTE.31\/
T/i5Kdefine.NUM_SAFE.64\/Kdefine.CSUM_MOD.65536\/\/@*.header.characte
T/jXrs.*@\/Kdefine.CODE_HEAD.'J'\/Kdefine.MAIN_HEAD.'K'\/Kdefine.isma
T/kvpchar(x).((x>='P'&&x<='9')^^(x>='A'&&x<='Z')^^(x>='a'&&x<='{z'))\
T/lu/\/long.line_num;\/long.expected_sum.=.0;\/extern.long.atol();\/i
T/mCnt.whatbyte[NSETS][NUM_SAFE];:@*.array.maps.printables.to.bytes.*
T/nZ@\/char.linbuf[MAX_LLEN];::@*.input.line.*@\/\/main()\/W\/:int.i,
T/oI.c,.len;\/:int.sum;\/:int.setby,.by;\/:char.ltype;\/\/:line_num.=
T/pH.1;\/Kifdef.msdos\/:setmode(.1,.O_BINARY.);::@*.make.stdout.binar
T/qiy.on.DOS.*@\/Kendif\/\/:while(.fgets(.linbuf,.MAX_LLEN,.stdin.).)
T/r6W\/::if(.linbuf[0].>=.'T'.&&.linbuf[0].<=.'Z'.).W\/:::ltype.=.lin
T/svbuf[4].==.linbuf[5].?.linbuf[4].G.0;\/:::len.=.strlen(linbuf);\/:
T/tY::if(.linbuf[len-1].==.'jn'.)\/::::linbuf[--len].=.0;\/:::.else\/
T/uK::::continue;:@*.line.too.long.*@\/:::sum.=.0;\/:::for(.i.=.4;.i.
T/v4<.len;.i++.)\/::::sum.+=.linbuf[i];\/:::@*.bad.checksum,.not.a.li
T/w.ne.for.us.*@\/:::if(.(sum.%.NUM_SAFE).`=.bconv(linbuf[3]).)\/::::
T/xncontinue;\/:::if(.(.(long)(bconv(linbuf[0])-SFBYTE)*NUM_SAFE+\/::
T/yx:::bconv(linbuf[1]))*NUM_SAFE.+\/:::::bconv(linbuf[2]).`=.line_nu
T/zQm++.)\/::::bomb_out(JSequenceJ);\/:::if(.ltype.==.MAIN_HEAD.).W\/
T0.7::::if(.linbuf[6].==.'S'.).W\/:::::int.ver;\/:::::ver.=.atoi(linb
T0/ouf+7);\/:::::if(.ver.>.OUR_VERSION.^^.ver.<.1000.)\/::::::bomb_ou
T00qt(.JVersion.numberJ.);\/:::::if(strcmp(linbuf+len-5,J,ABE2J).`=.0
T01F.)\/::::::bomb_out(JBad.Encoding.StyleJ);\/:::::Q\/::::.else\/:::
T02X::if(.expected_sum.`=.atol(linbuf+7).)\/::::::bomb_out(.JChecksum
T03GJ.);\/::::Q\/:::else.if(.ltype.==.CODE_HEAD.).W.@*.enco